﻿
namespace AdTech.Snap
{
    /// <summary>
    /// Holds serializable configuration properties and loads/saves them from/to file.
    /// </summary>
    public interface IConfiguration
    {
        // Properties
        /// <summary>
        /// Gets a value whether this is a new configuration.
        /// </summary>
        bool IsNew { get; }
        /// <summary>
        /// Gets or sets the default snapshot location.
        /// </summary>
        string DefaultFileDestination { get; set; }
        /// <summary>
        /// Gets or sets the Dropbox UserID.
        /// </summary>
        int DropboxUID { get; set; }
        /// <summary>
        /// Gets or sets the color of the overlay.
        /// </summary>
        string OverlayColor { get; set; }
        /// <summary>
        /// Gets or sets the opacity of the overlay color.
        /// </summary>
        double OverlayColorOpacity { get; set; }
        /// <summary>
        /// Gets or sets a value whether Dropbox integration is enabled.
        /// </summary>
        bool UseDropbox { get; set; }
        /// <summary>
        /// Gets or sets a value whether a QRCode of the public Dropbox link should be created.
        /// </summary>
        bool CreateQRCode { get; set; }
        /// <summary>
        /// Gets a value whether Snap is in AutoStart.
        /// </summary>
        bool IsInSystemStart { get; }

        // Methods
        /// <summary>
        /// Saves the current configuration instance.
        /// </summary>
        void Save();
        /// <summary>
        /// Returns a shallow copy of the current configuration instance.
        /// </summary>
        /// <returns>A new <see cref="AdTech.Snap.IConfiguration"/> instance with the same values.</returns>
        IConfiguration Clone();
        /// <summary>
        /// Copies the given configuration instance properties to those of the current one but keeps the object reference.
        /// </summary>
        /// <param name="source">An <see cref="AdTech.Snap.IConfiguration"/> instance to copy properties from.</param>
        void MapFrom(IConfiguration source);
        /// <summary>
        /// Adds or removes Snap from AutoStart.
        /// </summary>
        /// <param name="value">Set to true if it should be added to AutoStart or false if it should be removed.</param>
        void SetAutostart(bool value);
    }
}
